Habanero-Scala: Async-Finish Programming in Scala

نویسندگان

  • Shams Imam
  • Vivek Sarkar
چکیده

With the advent of the multicore era, it is clear that improvements in application performance will require parallelism. Programming models that utilize multiple cores offer promising directions for the future where core counts are expected to increase. There is, hence, a renewed interest in programming models that simplify the reasoning and writing of efficient parallel programs. In this paper, we present Habanero-Scala (HS) which implements a generic task parallel programming model that can be used to parallelize both regular and irregular applications. HS is a library extension of Scala and supports a hybrid programming model combining the previously developed Async/Finish Model (AFM) and Actor Model (AM). HS extends Scala’s actor-based concurrency model with creation of lightweight tasks embodied in async, future, and foreach constructs; termination detection using the finish construct; locality in the form of places; weak isolation using isolated blocks; and task coordination patterns using phasers, data-driven futures. HS offers a simpler parallel programming model compared to writing programs using threads and adds to the tools available for the programmer to aid in productivity and performance while developing parallel software.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

RAY: Integrating Rx and Async for Direct-Style Reactive Streams

Languages like F#, C#, and recently also Scala, provide “async” extensions which aim to make asynchronous programming easier by avoiding an inversion of control that is inherent in traditional callback-based programming models (for the purpose of this paper called the “Async” model). This paper outlines a novel approach to integrate the Async model with observable streams of the Reactive Extens...

متن کامل

A Formal Model for Direct-style Asynchronous Observables

Asynchronous programming has been a challenge for a long time. A multitude of programming models have been proposed that aim to simplify the task. Interestingly, there are elements of a convergence arising, at least with respect to the basic building blocks: futures and promises have begun to play an increasingly important role in a number of languages like Java, C++, ECMAScript, and Scala. The...

متن کامل

Reactive Programming using the Algebra of Communicating Processes

R&D on reactive programming is growing and this has delivered quite many language constructs, libraries and tools. Scala programmers can use threads, timers, actors, futures, promises, observables, the async construct, and others. Still it seems to us that the state of the art is not mature: reactive programming is relatively hard, and confidence in correct operation depends mainly on extensive...

متن کامل

Finish Accumulators: a Deterministic Reduction Construct for Dynamic Task Parallelism

Parallel reductions represent a common pattern for computing the aggregation of an associative and commutative operation, such as summation, across multiple pieces of data supplied by parallel tasks. In this paper, we introduce finish accumulators, a unified construct that supports predefined and user-defined deterministic reductions for dynamic async-finish task parallelism. Finish accumulator...

متن کامل

On the Benefits of Combining Functional and Imperative Programming for Multicore Software An Empirical Study Comparing Scala and Java

Recent multi-paradigm programming languages combine functional and imperative programming styles to make software development easier. Given today’s proliferation of multicore processors, parallel programmers are supposed to benefit from this combination, as many difficult problems can be expressed more easily in a functional style while others match an imperative style. However, due to a lack o...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2012